package cn.iocoder.yudao.module.product.spu.vo;

import cn.iocoder.yudao.framework.common.pojo.SortablePageParam;
import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.module.api.product.spu.enums.ProductSpuRecommendEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 产品 SPU 分页 Request VO")
@Data
public class ProductSpuPageReqVO extends SortablePageParam {

    @Schema(description = "产品名称", example = "清凉小短袖")
    private String name;

    @Schema(description = "店铺编号", example = "1")
    private Long shopId;

    @Schema(description = "产品类型：mall-商城、food-美食、hotel-酒店……", example = "mall")
    private String type;

    @Schema(description = "前端请求的页签类型：ALL-全部、FOR_SALE-销售中、IN_WAREHOUSE-仓库中/已下架、SOLD_OUT-已售罄、RECYCLE_BIN-回收站、ALERT_STOCK-警戒库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "ALL")
    private String tabType;

    @Schema(description = "行业类目编号", example = "1")
    private Long platformCategoryId;

    @Schema(description = "产品分类编号", example = "1")
    private Long categoryId;

    @Schema(description = "产品分类编号数组", example = "1,2,3")
    private String categoryIds;

    @Schema(description = "产品品牌编号", example = "1")
    private Long brandId;

    @Schema(description = "推荐类型：0-无、1-精选、2-爆款、3-新品、4-补贴", example = "1")
    @InEnumValue(ProductSpuRecommendEnum.class)
    private Integer recommend;

    @Schema(description = "是否置顶", example = "false")
    private Boolean isSticky;

    @Schema(description = "是否积分产品", example = "false")
    private Boolean isIntegral;

    @Schema(description = "创建时间", example = "2022-07-01 00:00:00, 2022-07-01 23:59:59")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

}
